<?php

namespace LowCode\Traits\Events;


trait HasOnClose
{
    /**
     * onClose 关闭事件
     * @param string $event 函数 () => boolean | Promise<boolean> | any
     * @param string|null $id
     * @param array $modifiers
     * @return $this
     */
    public function onClose(string $event = "()=>{ return true }", string $id = null, array $modifiers = []): static
    {
        return $this->event("close", jsFn($event, $id), $modifiers);
    }
}
